﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace ComicsEditor
{
    public class DashedRect : PageObject
    {
        public Rectangle Rectangle;

        public DashedRect(Page Page, Rectangle Rectangle) : base(Page)
        {
            this.Rectangle = Rectangle;
        }

        public override void Draw(Graphics Graphics)
        {
            RectangleF rectF = new RectangleF(Page.Transform(Rectangle.Location), Page.Transform(new Size(Rectangle.Width - 1, Rectangle.Height - 1)));
            Rectangle rect = new Rectangle((int)rectF.X, (int)rectF.Y, (int)rectF.Width, (int)rectF.Height);
            Graphics.DrawRectangle(DashedLine.penEven, rect);
            Graphics.DrawRectangle(DashedLine.penOdd, rect);
        }
    }
}
